﻿<%@ page language="java"  pageEncoding="UTF-8" import="java.util.Vector,com.scn.base.page.TreeNode"%>
<%@ taglib uri="/tags/app" prefix="app"%>

<HTML> 
<HEAD> 
<TITLE>角色权限设置</TITLE> 
<META content="MSHTML 6.00.2800.1276" name=GENERATOR> 
<META http-equiv=Content-Type content="text/html; charset=UTF-8"> 
<META http-equiv=Content-Style-Type content=text/css> 
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
<script language="javascript">
var SubImg = '<app:ContextPath/>/gximages/style1/menu/menu_arrow_close.gif';
var SubImgOpen = '<app:ContextPath/>/gximages/style1/menu/menu_arrow_open.gif';
</script>

<script language="javascript" src="<app:ContextPath/>/gxjs/style1/systemMsg.js"></script> 
<script language="javascript" src="<app:ContextPath/>/gxjs/style1/powerset.js"></script> 
<script language="javascript" src="<app:ContextPath/>/gxjs/style1/pageCommon.js"></script> 
<script language="javascript" src="<app:ContextPath/>/gxjs/style1/general.js"></script> 
<LINK href="<app:ContextPath/>/gxcss/style1/mainWin1.css" type=text/css  media=screen rel=stylesheet>
<LINK href="<app:ContextPath/>/gxcss/style1/query.css" type=text/css  media=screen rel=stylesheet>
<LINK href="<app:ContextPath/>/gxcss/style1/02.css" type=text/css  media=screen rel=stylesheet>
<LINK href="<app:ContextPath/>/gxcss/style1/mainWin2.css" type=text/css  media=screen rel=stylesheet>
<LINK href="<app:ContextPath/>/gxcss/style1/file.css" type=text/css  media=screen rel=stylesheet>

</HEAD> 
<body marginwidth="0" topmargin="0" leftmargin="0"  marginheight="0">
<form method="post" id="actForm" name="actForm" action="<app:ContextPath/>/funcList.action">
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=1 WIDTH=100%> 
<%
		TreeNode root = (TreeNode)request.getAttribute("powerRoot");
		Vector<TreeNode> first=root.getAllChild();
		for(TreeNode n:first){
		   System.out.println("--"+n.getId()+" "+n.getPid()+" "+n.getName());
			if(n.hasChild()){//第一级菜单
 %>
<tr> 
<td> 

<table border=0 cellpadding=0 cellspacing=0 width=100%> 
<tr> 
<td class=Menu_head_Table> 
<TABLE id=MEMU_FUNC<%=n.getId()%> width=100% cellSpacing=0 cellPadding=0 border=0> 
<TR style='cursor:pointer' height=23> 
<td width=18 id=MEMU_FUNC<%=n.getId()%> onclick=menuClick(this);></td> 
<td width=25><input TYPE=CHECKBOX id=MEMUCHECK_FUNC<%=n.getId()%> onclick = clickMenuCheck(this); <%if(!n.getSrpid().equals("-1")){%>checked<%}%>></td> 
<TD class=Menu_layer1_Title id=MEMU_FUNC<%=n.getId()%> onclick=menuClick(this);><%=n.getName()%></TD> 
<TD></TD> 
<td width=7><img border=0 src='<app:ContextPath/>/gximages/style1/menu_head_title.gif'></td> 
</TR> 
</TABLE> 
</TD> 
</TR> 
</TABLE> 

<TABLE width=100% id=MEMU_FUNC<%=n.getId()%>d style='DISPLAY: none' cellSpacing=0 cellPadding=0 border=0> 
<%Vector<TreeNode> second=n.getAllChild();

				for(TreeNode p:second){//第二级菜单
				System.out.println("----"+p.getId()+" "+p.getPid()+" "+p.getName());
					if(p.hasChild()){ %>
<TR> 
<TD class=Menu_layer1_Table> 
<TABLE id=MEMU_FUNC<%=p.getId()%> border=0 cellpadding=0 cellspacing=0 width=100%> 
<tr class=Menu_mid> 
<td width=30></td> 
<td width=19></td> 
<td width=19></td> 
<td></td> 
<TD width=18></TD> 
</tr> 
<tr height=19 style='cursor:pointer'> 
<td id=MEMU_FUNC<%=p.getId()%> onclick=subMenuClick(this);></td> 
<td><img id=MEMU_FUNC<%=p.getId()%>_img onclick=subMenuClick(this); border=0 src='<app:ContextPath/>/gximages/style1/menu_arrow_close.gif'></td> 
<td><input type=CHECKBOX ID='MEMUCHECK_FUNC<%=p.getId()%>' STYLE='zoom:80%' NAME='FUNC<%=n.getId()%>' onclick=clickMenuCheck(this); <%if(!p.getSrpid().equals("-1")){%>checked<%}%>></td> 
<td class=Menu_layer1_Title id=MEMU_FUNC<%=p.getId()%> onclick=subMenuClick(this);><%=p.getName()%></td> 
<TD></TD> 
</tr> 
</TABLE> 
</td> 
</tr> 
<TR> 
<TD class=Menu_layer2_Table> 
<TABLE id=MEMU_FUNC<%=p.getId()%>d style='DISPLAY: none' cellSpacing=0 cellPadding=0 border=0> 
<tr class=Menu_mid> 
<td width=30></td> 
<td width=19><img border=0 src='<app:ContextPath/>/gximages/style1/menu_arrow_point.gif'></td> 
<td></td> 
<td></td> 
</tr> 
<%Vector<TreeNode> third=p.getAllChild();
						for(TreeNode q:third){//第三级菜单
						System.out.println("------"+q.getId()+" "+q.getPid()+" "+q.getName()+" "+q.getSrpid()+" "+q.getSrpid().equals("-1"));
						 %>
<tr style='cursor:pointer' height=19> 
<td></td> 
<td><img border=0 src='<app:ContextPath/>/gximages/style1/menu_line_3.gif'></td> 
<td class=Menu_layer2_Title>&nbsp;&nbsp;&nbsp;<INPUT TYPE=CHECKBOX ID='CHECK_FUNC<%=q.getId()%>' STYLE='zoom:80%' NAME='FUNC<%=p.getId()%>' onclick=clickMenuCheck(this); <%if(!q.getSrpid().equals("-1")){%>checked<%}else{%><%}%> value='<app:FuncValue funcs="<%=q.getFunc()%>" smid="<%=q.getId()%>"/>'><SPAN ID='EDIT_FUNC<%=q.getId()%>' onclick =onClickEdit(this); ><%=q.getName()%></SPAN></td> 
<td></td></tr> 
<tr class=Menu_mid> 
<td width=30></td> 
<td width=19><img border=0 src='<app:ContextPath/>/gximages/style1/menu_arrow_point.gif'></td> 
<td></td> 
<td></td> 
</tr> 
<%} %>
</table></td></tr>
<%}else{ %>
<TR> 
<TD class=Menu_layer1_Table> 
<TABLE id=MEMU_FUNC<%=p.getId()%> border=0 cellpadding=0 cellspacing=0 width=100%> 
<tr class=Menu_mid> 
<td width=30></td> 
<td width=19></td> 
<td width=19></td> 
<td></td> 
<TD width=18></TD> 
</tr> 
<tr height=19 style='cursor:pointer'> 
<td></td> 
<td><img id=MEMU_FUNC<%=p.getId()%>_img border=0 src='<app:ContextPath/>/gximages/style1/menu_arrow_single.gif'></td> 
<td><input type=CHECKBOX ID='CHECK_FUNC<%=p.getId()%>' STYLE='zoom:80%' NAME='FUNC<%=n.getId()%>' onclick=clickMenuCheck(this); value='<app:FuncValue funcs="<%=p.getFunc()%>" smid="<%=p.getId()%>"/>' <%if(!p.getSrpid().equals("-1")){%>checked<%}else{%><%}%>></td> 
<td class=Menu_layer1_Title><SPAN ID='EDIT_FUNC<%=p.getId()%>' onclick =onClickEdit(this); ><%=p.getName()%></SPAN></td> 
<TD></TD> 
</tr> 
</TABLE> 
</td> 
</tr> 
<%}} %>
</table>
</td> 
</tr> 
<%} 
}%>
</table>
</form>
</body> 
</HTML>